<template>
    <div class="pay">
      <div class="title">本订单由商家返款，商家已直接返款到您绑定的 支付宝 中。</div>
      <div class="item">
        <div class="name">试用ID：</div>
        <div class="text" v-text="user.id"></div>
        <Copy :name="user.id" target="id"></Copy>
      </div>
      <div class="item">
        <div class="name">订单号：</div>
        <div class="text" v-text="user.ordernum"></div>
        <Copy :name="user.ordernum" target="ordernum"></Copy>
      </div>
      <div class="item">
        <div class="name">返款日期：</div>
        <div class="text" v-text="user.alitime"></div>
      </div>
      <div class="item">
        <div class="name">支付宝帐号：</div>
        <div class="text" v-text="user.toalipay"></div>
      </div>
      <div class="item">
        <div class="name">提交订单金额：</div>
        <div class="text"  v-text="`${user.money}元`"></div>
      </div>
      <div class="item">
        <div class="name">商家返款金额：</div>
        <div class="text"  v-text="`${user.money}元`"></div>
      </div>
    </div>
  </template>
  
  <script>
  import User from "../../service/user.js";
  import Copy from "@/views/components/copy.vue";
  export default {
    name: "pay",
    components: {
        Copy
    },
    data() {
      return {
        is: false,
        user: {},
      };
    },
    mounted() {
      this.init();
    },
    methods: {
      init: function() {
        this.user.uid = this.$store.state.uid;
        this.fnGetData();
      },
      fnGetData: function() {
        let {order_id} = this.$route.params;
        User.getPayDetail({
          order_id,
          isToken: true,
        }).then((res) => {
            console.log(res)
          if (res && res.status) {
            this.user = res.data;
          }
        });
      },
    }
  };
  </script>
  
  <style lang="scss" scoped>
    .pay {
        background-color: #fff;
        padding: 10px;
        margin: 15px;
        border-radius: 4px;
        font-size: 14px;
        color: #444;
        .title {
            padding-bottom: 10px;
        }
        .item {
            padding: 10px 0;
            border-top: 1px solid #eee;
            display: flex;
            flex-direction: row;
            align-items: center;
            .text {
                padding-right: 5px;
            }
            
        }
    }
  </style>
  